//
//  LGButtonCell.m
//  celltest
//
//  Created by guomianxiang on 2017/4/7.
//  Copyright © 2017年 guomianxiang. All rights reserved.
//

#import "LGButtonCell.h"
#import "LGDCCellContent.h"

@implementation LGButtonCell


- (void)setContent:(LGDCCellContent *)content {
    [super setContent:content];
    [self.button setTitle:content.title forState:(UIControlStateNormal)];
    
}

- (void)buttonClick:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(cellButtonClick)]) [self.delegate cellButtonClick];
}


- (void)awakeFromNib {
    [super awakeFromNib];
    self.button.layer.cornerRadius = 6;
    self.button.layer.masksToBounds = YES;
    [self.button addTarget:self action:@selector(buttonClick:) forControlEvents:(UIControlEventTouchUpInside)];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
